package com.lyj.springcloud.service.impl;

import com.lyj.springcloud.mapper.PaymentMapper;
import com.lyj.springcloud.entities.CommonResult;
import com.lyj.springcloud.entities.Payment;
import com.lyj.springcloud.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PaymentServiceImpl implements PaymentService {

    @Autowired
    PaymentMapper dao;

    @Override
    public CommonResult<Payment> getPayment(String id) {
        Payment payment = dao.getPaymentById(id);
        return new CommonResult<>("200","8001接入成功",payment);
    }

    /**
     * 测试openfeign 调用
     * @return
     */
    @Override
    public CommonResult linkFeign() {
        return new CommonResult<>("200","link feign success");
    }
}
